package cn.cfoodc.sharding.service.impl;

import cn.cfoodc.sharding.domain.TComplex;
import cn.cfoodc.sharding.mapper.TComplexMapper;
import cn.cfoodc.sharding.service.TComplexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

@Service
public class TComplexServiceImpl implements TComplexService {

    private TComplexMapper tComplexMapper;
    @Autowired
    public TComplexServiceImpl(TComplexMapper tComplexMapper){
        this.tComplexMapper=tComplexMapper;
    }

    @Override
    public List<TComplex> selectAll(String benginCreateDatetime , String endCreateDatetime) {
        return tComplexMapper.selectAll(benginCreateDatetime,endCreateDatetime);
    }


    @Override
    public TComplex selectByPrimaryKey(Long userId ,Long id) {
        return tComplexMapper.selectByPrimaryKey(userId,id);
    }

    @Override
    public int insertOne(TComplex tComplex) {
        return tComplexMapper.insertOne(tComplex);
    }

    @Override
    public TComplex selectByUseridAndCreatedate(Long userId, String createDatetime) {
        return tComplexMapper.selectByUseridAndCreatedate(userId , createDatetime);
    }

    @Override
    public int deleteByPrimaryKey(Long id , Timestamp createDatetime) {
        return tComplexMapper.deleteByPrimaryKey(id , createDatetime);
    }

    @Override
    public int updateByPrimaryKey(TComplex tComplex) {
        return tComplexMapper.updateByPrimaryKey(tComplex);
    }
}
